.editor-overlay {
  z-index: 1089;
  width: 100%;
  container-type: inline-size;
  container-name: editor-overlay;
}

.editor-overlay-toolbar {
  position: absolute;
  min-width: max-content;
  background-color: #0081f1;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  display: none;
  right: 2px;
  top: 2px;
  left: auto;
  cursor: auto;
  z-index: 1091;
  padding: 2px 2px;
  border-radius: 4px;
}

/* If the editor overlay is really small, move the toolbar to the bottom so it doesn't cover the content */
@container editor-overlay (max-width: 200px) {
  .editor-overlay-toolbar {
    top: 100%;
    right: 0px;
  }
}

.editor-overlay-toolbar button {
  padding: 8px;
  border-radius: 4px;
}
.editor-overlay-toolbar button:hover,
.editor-overlay-toolbar button:focus {
  background-color: #0d53b5;
}
.editor-overlay:hover,
.editor-overlay:focus,
.editor-overlay-active,
.editor-overlay-hover {
  border: 1px solid #2c6ecb;
}
.editor-overlay:focus,
.editor-overlay-active {
  border-width: 3px !important;
}
.editor-overlay:hover .editor-overlay-toolbar,
.editor-overlay:focus .editor-overlay-toolbar,
.editor-overlay-active .editor-overlay-toolbar,
.editor-overlay-hover .editor-overlay-toolbar {
  display: block;
}
